#include <stdio.h>
int main()
{
	int i=1,flag=1;
	double eps,sum=0.0;
	scanf("%lf",&eps);
	if(eps<=1){
	for(i=1;1.0/i>=eps;i=i+2)
	{
		sum=sum+1.0000/i*flag;
		flag=-flag;
	}
	sum=sum+1.0/i*flag;}
	else
	sum=1;
	printf("Pi = %.4lf",4*sum);
	return 0;
}
